Optimal. Leaf size=221 \[ -\frac {i b^2}{2 d^2 (i-c x)}+\frac {i b^2 \text {ArcTan}(c x)}{2 d^2}+\frac {b (a+b \text {ArcTan}(c x))}{d^2 (i-c x)}-\frac {(a+b \text {ArcTan}(c x))^2}{2 d^2}+\frac {i (a+b \text {ArcTan}(c x))^2}{d^2 (i-c x)}+\frac {2 (a+b \text {ArcTan}(c x))^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {(a+b \text {ArcTan}(c x))^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {i b (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {b^2 \text {PolyLog}\left (3,-1+\frac {2}{1+i c x}\right )}{2 d^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.45, antiderivative size = 221, normalized size of antiderivative = 1.00, number of steps
used = 19, number of rules used = 12, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.480, Rules used = {4996, 4942,
5108, 5004, 5114, 6745, 4974, 4972, 641, 46, 209, 4964} \begin {gather*} \frac {i b \text {Li}_2\left (\frac {2}{i c x+1}-1\right ) (a+b \text {ArcTan}(c x))}{d^2}+\frac {b (a+b \text {ArcTan}(c x))}{d^2 (-c x+i)}+\frac {i (a+b \text {ArcTan}(c x))^2}{d^2 (-c x+i)}-\frac {(a+b \text {ArcTan}(c x))^2}{2 d^2}+\frac {\log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))^2}{d^2}+\frac {2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))^2}{d^2}+\frac {i b^2 \text {ArcTan}(c x)}{2 d^2}+\frac {b^2 \text {Li}_3\left (\frac {2}{i c x+1}-1\right )}{2 d^2}-\frac {i b^2}{2 d^2 (-c x+i)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 209
Rule 641
Rule 4942
Rule 4964
Rule 4972
Rule 4974
Rule 4996
Rule 5004
Rule 5108
Rule 5114
Rule 6745
Rubi steps
\begin {align*} \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{x (d+i c d x)^2} \, dx &=\int \left (\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{d^2 x}+\frac {i c \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (-i+c x)^2}-\frac {c \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (-i+c x)}\right ) \, dx\\ &=\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{x} \, dx}{d^2}+\frac {(i c) \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{(-i+c x)^2} \, dx}{d^2}-\frac {c \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{-i+c x} \, dx}{d^2}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (i-c x)}+\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {(2 i b c) \int \left (-\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 (-i+c x)^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{d^2}-\frac {(2 b c) \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac {(4 b c) \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (i-c x)}+\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {(b c) \int \frac {a+b \tan ^{-1}(c x)}{(-i+c x)^2} \, dx}{d^2}-\frac {(b c) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{d^2}+\frac {(2 b c) \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac {(2 b c) \int \frac {\left (a+b \tan ^{-1}(c x)\right ) \log \left (2-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac {\left (i b^2 c\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}\\ &=\frac {b \left (a+b \tan ^{-1}(c x)\right )}{d^2 (i-c x)}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 d^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (i-c x)}+\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+i c x}\right )}{2 d^2}+\frac {\left (i b^2 c\right ) \int \frac {\text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac {\left (i b^2 c\right ) \int \frac {\text {Li}_2\left (-1+\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{d^2}+\frac {\left (b^2 c\right ) \int \frac {1}{(-i+c x) \left (1+c^2 x^2\right )} \, dx}{d^2}\\ &=\frac {b \left (a+b \tan ^{-1}(c x)\right )}{d^2 (i-c x)}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 d^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (i-c x)}+\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1+i c x}\right )}{2 d^2}+\frac {\left (b^2 c\right ) \int \frac {1}{(-i+c x)^2 (i+c x)} \, dx}{d^2}\\ &=\frac {b \left (a+b \tan ^{-1}(c x)\right )}{d^2 (i-c x)}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 d^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (i-c x)}+\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1+i c x}\right )}{2 d^2}+\frac {\left (b^2 c\right ) \int \left (-\frac {i}{2 (-i+c x)^2}+\frac {i}{2 \left (1+c^2 x^2\right )}\right ) \, dx}{d^2}\\ &=-\frac {i b^2}{2 d^2 (i-c x)}+\frac {b \left (a+b \tan ^{-1}(c x)\right )}{d^2 (i-c x)}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 d^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (i-c x)}+\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1+i c x}\right )}{2 d^2}+\frac {\left (i b^2 c\right ) \int \frac {1}{1+c^2 x^2} \, dx}{2 d^2}\\ &=-\frac {i b^2}{2 d^2 (i-c x)}+\frac {i b^2 \tan ^{-1}(c x)}{2 d^2}+\frac {b \left (a+b \tan ^{-1}(c x)\right )}{d^2 (i-c x)}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{2 d^2}+\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{d^2 (i-c x)}+\frac {2 \left (a+b \tan ^{-1}(c x)\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+i c x}\right )}{d^2}+\frac {\left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2}{1+i c x}\right )}{d^2}+\frac {i b \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (-1+\frac {2}{1+i c x}\right )}{d^2}+\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1+i c x}\right )}{2 d^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.55, size = 299, normalized size = 1.35 \begin {gather*} \frac {-\frac {24 i a^2}{-i+c x}-24 i a^2 \text {ArcTan}(c x)+24 a^2 \log (c x)-12 a^2 \log \left (1+c^2 x^2\right )-12 a b \left (4 i \text {ArcTan}(c x)^2+i \cos (2 \text {ArcTan}(c x))+2 i \text {PolyLog}\left (2,e^{2 i \text {ArcTan}(c x)}\right )-2 \text {ArcTan}(c x) \left (\cos (2 \text {ArcTan}(c x))+2 \log \left (1-e^{2 i \text {ArcTan}(c x)}\right )-i \sin (2 \text {ArcTan}(c x))\right )+\sin (2 \text {ArcTan}(c x))\right )+b^2 \left (-i \pi ^3-6 \cos (2 \text {ArcTan}(c x))-12 i \text {ArcTan}(c x) \cos (2 \text {ArcTan}(c x))+12 \text {ArcTan}(c x)^2 \cos (2 \text {ArcTan}(c x))+24 \text {ArcTan}(c x)^2 \log \left (1-e^{-2 i \text {ArcTan}(c x)}\right )+24 i \text {ArcTan}(c x) \text {PolyLog}\left (2,e^{-2 i \text {ArcTan}(c x)}\right )+12 \text {PolyLog}\left (3,e^{-2 i \text {ArcTan}(c x)}\right )+6 i \sin (2 \text {ArcTan}(c x))-12 \text {ArcTan}(c x) \sin (2 \text {ArcTan}(c x))-12 i \text {ArcTan}(c x)^2 \sin (2 \text {ArcTan}(c x))\right )}{24 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.94, size = 1921, normalized size = 8.69
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(1921\) |
default | \(\text {Expression too large to display}\) | \(1921\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{x\,{\left (d+c\,d\,x\,1{}\mathrm {i}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________